package com.canal.starter.annotation;

import com.alibaba.otter.canal.protocol.CanalEntry;
import org.springframework.core.annotation.AliasFor;

import java.lang.annotation.*;

/**
 * 用于 delete 的 ListenPoint
 *
 * @author chen.qian
 * @date 2018/3/19
 */
@Documented
@Target({ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
@ListenPoint(eventType = CanalEntry.EventType.DELETE)
public @interface DeleteListenPoint {
    /**
     * canal destination
     * default for all
     *
     * @return canal destination
     */
    @AliasFor(annotation = ListenPoint.class) String destination() default "";

    /**
     * database schema which you are concentrate on
     * default for all
     *
     * @return canal destination
     */
    @AliasFor(annotation = ListenPoint.class) String[] schema() default {};

    /**
     * tables which you are concentrate on
     * default for all
     *
     * @return canal destination
     */
    @AliasFor(annotation = ListenPoint.class) String[] table() default {};
}
